<template>
  <div>
    <h2>添加</h2>
    <table border="1">
      <tr>
        <td>名字</td>
        <td>
          <input type="text" />
        </td>
      </tr>

      <tr>
        <td>价格</td>
        <td><input type="text" /></td>
      </tr>

      <tr>
        <td>数量</td>
        <td><input type="text" /></td>
      </tr>

      <tr>
        <td>状态</td>
        <td>
            <input type="radio" name="status" value="1" />启用
            <input type="radio" name="status" value="0" />禁用
        </td>
      </tr>

      <tr>
        <td></td>
        <td><input type="button" value="添加" @click="add" /></td>
      </tr>
    </table>
  </div>
</template>

<script setup lang="ts">
import { reactive, toRefs, onMounted } from "vue";
import { useRouter, useRoute } from "vue-router";
import axios from "axios";

const router = useRouter();
const route = useRoute();

const add = () => {
  alert("添加成功");
  router.push("/Show");
};
</script>

<style scoped>
</style>